package everyday;

/**
 * @Author: Siantar
 * @Date: 2023-06-14-19:34
 * @Description: 1.0
 */
public class T1375 {
    public int numTimesAllBlue(int[] flips) {
        int max = 0, sum = 0;
        for (int i = 0; i < flips.length; i++) {
            max = Math.max(max, flips[i]);
            if (max == i + 1) sum++;
        }
        return sum;
    }
}
